import { CandidateStrategy, NodeType } from "@/components/SimpleProcessDesignerV2/src/consts"

// 流程实例
export interface ProcessInstanceModel {
  Id: number
  Name: string
  ProcessDefinitionId: string
  Category: string
  Result: number
  Tasks: TaskInfo[]
  Fields: string[]
  Status: number
  Remark: string
  BusinessKey: string
  CreateTime: string
  EndTime: string
  ProcessDefinition?: ProcessInstanceModel
}


// 任务信息
export interface TaskInfo {
  Id:string
  Name:string
}

// 审批信息
export interface ApprovalTaskInfo {
  Id: number
  OwnerUser: User
  AssigneeUser: User
  Status: number
  Reason: string
}


// 用户信息
export interface User {
  Id: number
  Nickname: string
  Avatar: string
}


// 审批节点信息
export interface ApprovalNodeInfo {
  Id: number
  Name: string
  NodeType: NodeType
  CandidateStrategy?: CandidateStrategy
  Status: number
  StartTime?: Date
  EndTime?: Date
  CandidateUsers?: User[]
  Tasks: ApprovalTaskInfo[]
}
